#include "Interface.h"

Interface::Interface(){
	head=NULL;
	tail=NULL;
}

void Interface::addTail(int inputLength, int inputBreath){
	Shape newShape;
	newShape.setLength(inputLength);
	newShape.setBreath(inputBreath);
	Node* temp = new Node;
		temp->setData(newShape);
	if (head==NULL) {
		head = temp;
		temp->setNext(tail);
	}else {
		Node* curr = head;
		while (curr->getNext() != tail){
			curr = curr->getNext();
		}
		curr->setNext(temp);
		temp->setNext(tail);
	}
}

void Interface::print(){
	Node* curr = head;

	while (curr != tail) {
		cout << "This object's length is " << curr->getData().getLength() << endl;
		cout << "This object's breath is " << curr->getData().getBreath() << endl;
		curr = curr->getNext();
	}
}
